# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=glibd
pkgver=2.4.2
pkgrel=4
pkgdesc="D bindings for the GLib C Utility Library"
url="https://github.com/gtkd-developers/GlibD"
arch="x86_64 aarch64" # ldc
license="GPL-3.0-or-later"
makedepends="meson gobject-introspection-dev glib-dev ldc gir-to-d"
subpackages="$pkgname-dev $pkgname-dbg"
source="https://github.com/gtkd-developers/GlibD/archive/v$pkgver/glibd-$pkgver.tar.gz
	Trivial-fix-for-Glib-2.78.patch"
builddir="$srcdir/GlibD-$pkgver"

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
6db52b29cf90a5d8f6ddb43c1ddcd5bcc6ed5b2b6cd575711beffff74b8592c07aa3c6a1047954305cbcd515ef6ea814c162a91c12e9580d5938228ecc7a6d49  glibd-2.4.2.tar.gz
7bcbf68b9a069860e81232da4ece4ea3e8f766afcefbb6dcff060e897bdd6dc00c8f045eb5b1547a981b08990b678eb54f22d620e375f1ee469caeb09331e2f7  Trivial-fix-for-Glib-2.78.patch
"
